<?php

/**
 * 用户类
 */
class User
{
    // 用户编号
    public $userid;
    // 用户名
    public $username;
    // 密码
    public $password;
    // 邮箱
    public $email;

    /**
     * @param $userid
     * @param $username
     * @param $password
     * @param $email
     */
    public function __construct($userid, $username, $password, $email)
    {
        $this->userid = $userid;
        $this->username = $username;
        $this->password = $password;
        $this->email = $email;
    }

    public static function baseInfo($userid, $username, $email): User
    {
        return new User($userid, $username, null, $email);
    }

    public static function empty(): User
    {
        return new User(null, null, null, null);
    }


}